package com.jilian.mydemo.modul.user.activity;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;
import android.widget.TextView;

import com.jilian.mydemo.MyApplication;
import com.jilian.mydemo.R;
import com.jilian.mydemo.base.BaseActivity;
import com.jilian.mydemo.modul.exam.ui.CooperationThatActivity;
import com.jilian.mydemo.modul.exam.ui.PartnershipApplicationActivity;
import com.jilian.mydemo.modul.main.ui.WelcomeActivity;

/**
 * 审核失败
 */
public class ReviewFailuerActivity extends BaseActivity {

    private TextView tvOk;



    @Override
    protected void createViewModel() {

    }
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        MyApplication.addActivity(this);
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        MyApplication.removeActivity(this);
    }

    @Override
    public int intiLayout() {

        return R.layout.activity_reviewfailuer;
    }

    @Override
    public void initView() {
        setNormalTitle(getIntent().getStringExtra("title"), v -> finish());
        tvOk = (TextView) findViewById(R.id.tv_ok);
    }

    @Override
    public void initData() {
        MyApplication.clearSpecifyActivities(new Class[]{WelcomeActivity.class});
    }

    @Override
    public void initListener() {
        tvOk.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                if ("实名认证".equals(getIntent().getStringExtra("title"))) {
                    //实名认证
                    startActivity(new Intent(ReviewFailuerActivity.this,RealNameAuthenticationActivity.class));
                }
                else{
                    //去合伙人申请
                    startActivity(new Intent(ReviewFailuerActivity.this,PartnershipApplicationActivity.class));
                }
                finish();
            }
        });

    }
}
